<?php 
namespace Home\Controller;
use Home\Controller\BaseController;
/**
* @author 闲云野鹤
* @copyright 
*/
class RuleController extends BaseController
{
	
	public function rulelist(){
		$rule=D('AuthRule');
		$list=$rule->select();
		$this->assign('rules',$list);
		$this->display();


	}
	public function ruledel()
	{

	}
	public function ruleadd()
	{
		if(IS_POST){
			
			$rule=D('AuthRule');
			$res=$rule->add($_POST);
			if($res){
				$this->success('添加成功');
			}else{
				$this->error('添加失败');
			}
		
		}
		else{
			$this->display();
		}
	}
	public function ruleedit()
	{

	}

}


 ?>